﻿cmake_minimum_required(VERSION 3.26)

project(ISO LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)

enable_language(CUDA)
include(CheckLanguage)
check_language(CUDA)
# CMake 3.18 adds integrated support for architecture selection, but we can't rely on it
set(CMAKE_CUDA_ARCHITECTURES OFF)
string(APPEND CMAKE_CUDA_FLAGS
  # Allow __host__, __device__ annotations in lambda declaration.
  " --expt-extended-lambda"
  # Allow host code to invoke __device__ constexpr functions and vice versa
  " --expt-relaxed-constexpr"
  " -w"
)

file(GLOB_RECURSE SRC_FILE src/*.h src/*.cpp src/*.cu)
add_executable(${PROJECT_NAME} ${SRC_FILE})

add_subdirectory(third_party) 

add_compile_definitions(_USE_MATH_DEFINES NOMINMAX _CRT_SECURE_NO_WARNINGS)
target_link_libraries(${PROJECT_NAME} PUBLIC tinyxml)
target_include_directories(${PROJECT_NAME} PUBLIC 
				third_party
				third_party/tinyxml
)